import 'dart:io';

void clientTest() async {
  var uri = 'https://dart.dev';
  uri = 'https://baidu.com';
  var client = HttpClient();
  var request = await client.getUrl(Uri.parse(uri));
  var response = await request.close();
  var redirects = response.redirects;
  print(redirects.length);
  redirects.forEach((element) {
    print('${element.location} ${element.statusCode} ${element.method}');
  });
}

void main() {
  clientTest();
}
